<?php
    $zip = new ZipArchive;
    $download = 'download.zip';
	//$dir = $_GET['dossier'];
	$dir = 'facture_temp/'.$_GET['dossier'];
    $zip->open($download, ZipArchive::CREATE);
    foreach (glob($dir."/*.pdf") as $file) 
	{ 
       $zip->addFile($file);
    }
    $zip->close();
    header('Content-Type: application/zip');
    header("Content-Disposition: attachment; filename = $download");
    header('Content-Length: ' . filesize($download));
    header("Location: $download");
 ?>